package com.mdd.admin.service.system.impl;

import com.mdd.admin.service.system.ISystemTransactionConfigService;
import com.mdd.admin.validate.system.SystemTransactionCancelUnpaidOrderConfingParam;
import com.mdd.common.utils.LsConfigUtil;
import org.springframework.stereotype.Service;

/**
 * 交易配置接口类
 */
@Service
public class SystemTransactionConfigServiceImpl implements ISystemTransactionConfigService {

    /**
     * 新增或更新 交易配置
     *
     * @author panweiliang
     * @param systemTransactionCancelUnpaidOrderConfingParam 参数
     */
    @Override
    public void addOrUpdateCancelUnpaidOrdersConfig(SystemTransactionCancelUnpaidOrderConfingParam systemTransactionCancelUnpaidOrderConfingParam) {
        LsConfigUtil.set("transaction", "cancel_unpaid_orders", String.valueOf(systemTransactionCancelUnpaidOrderConfingParam.getCancel_unpaid_orders()));
        LsConfigUtil.set("transaction", "cancel_unpaid_orders_times", String.valueOf(systemTransactionCancelUnpaidOrderConfingParam.getCancel_unpaid_orders_times()));
        LsConfigUtil.set("transaction", "purchase", String.valueOf(systemTransactionCancelUnpaidOrderConfingParam.getPurchase()));
        LsConfigUtil.set("transaction", "btn_str", String.valueOf(systemTransactionCancelUnpaidOrderConfingParam.getBtn_str()));
    }

}
